package com.lanou3g.hw0419;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

/**
 * If there are no bugs, it was created by Chen FengYao on 2018/4/20;
 * Otherwise, I don't know who created it either
 */

public class Main {
    public static void main(String[] args) {
        String rootPath = "C:\\Users\\73448\\Desktop\\作业\\Q1";

        File rootDir = new File(rootPath);//文件夹
        // 获取这个文件夹下的所有文件
        File[] files = rootDir.listFiles();
        for (File file : files) {

            String fileName = file.getName();
            if (fileName.contains(".txt")){
                new DelThread(file).start();
            }
        }
    }
}
